<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Home extends Front_Controller{

    function Home(){
        parent::Front_Controller();
    }
    function index($arr_content=NULL){
        $CI = &get_instance();
        $CI->load->module_define('front.home');
        $CI->load->module_helper('front.home.content_parser');				
		$curr_lang = $this->check_language();
        if(empty($arr_content))		
            $result = parse_content();
        else{
            list($content_left, $content_middle, $content_right) = $arr_content;
            $result = parse_content($content_left, $content_middle, $content_right);
        }
        if($result['page_active']==0){
            $this->view('permission');
        }
        unset($result['page_active']);
        foreach($result as $k=>$v)
            $this->add($k, $v);
    }
	
	function check_language(){
		$CI = &get_instance();
		$CI->load->module_library('home.detectlang');
		$config['language'] = $CI->detectlang->get_lang_data();
		return $CI->detectlang->get_lang_data();
	}
	

}